package com.estock.web.dao;


import java.util.List;

import com.estock.common.dao.BaseDao;
import com.estock.common.model.security.Stock;

/**
 * @author richard
 *
 */
public interface StockDao extends BaseDao<Stock> {
	
	public List<Stock> findAllStocks(); 
	
	public List<Stock> findAllStocksByType(int type, int currentPage, int itemsPerPage); 
	
	public List<Stock> findStocksByCategoryId(int stockCategoryId); 
	
	public Stock findStockByCode(String code);
	
	public int getStockNumByType(int type) throws Exception;
	
	
    // Self-Select stock related
	
	public int getSelfSelectNum() throws Exception;
	
	public List<Stock> findAllSelfSelects(int currentPage, int itemsPerPage);
	
	public Stock findSelfSelectByCode(String code);
	
	public void updateLatestPrice(String code, float latestPrice);
	
	public void deleteSelfSelectById(Long id);
	

	
}
